<?php 
	$dummy = HTML::instance("dummy");
	$dummyList = HTML::instance("dummyList");
	require_once TEMPLATES_PATH."/main.template.php"; 
?>

<?php Template::start('content') ?>
<?php HTML::form("dummy", "add")?>
<table>
	<tr>
		<td>
			<div id="showListArea">
				<table border="1">
					<tr>
						<td>Id</td>
						<td>Name</td>
						<td>Management</td>
					</tr>
					<?php foreach ($dummyList as $dummyEach){?>
					<tr>
						<td><?php echo $dummyEach->get("dummyId");?></td>
						<td><?php echo $dummyEach->get("dummyName");?></td>
						<td></td>
					</tr>
					<?php }?>
				</table>
			</div>
		</td>
		<td>
			<div id="editArea">
				<?php HTML::form("dummy", "save")?>
				<?php HTML::hidden("state", $dummy->getState()); ?>
				<?php HTML::hidden("version", $dummy->getVersion()); ?>
				<?php HTML::hidden("dummyId",null, $dummy); ?>
					<table border="1">
						<tr>
							<td>
								Column
							</td>
							<td>
								Data
							</td>
						</tr>
						<tr>
							<td>
								Name:
							</td>
							<td>
								<?php HTML::text("dummyName",null,null,$dummy);?>
							</td>
						</tr>
						<tr>
							<td>
								
							</td>
							<td>
								<?php HTML::button("submit","saveCommon")?>
								<?php HTML::submitAjaxAction("บันทึก","dummy","save")  ?>
							</td>
						</tr>
					</table>
				<?php HTML::formEnd();?>
			</div>
		</td>
	</tr>
</table>

<?php HTML::formEnd();?>
<script language="javascript">
</script>
<?php Template::end('content') ?>